<!DOCTYPE html>
<html lang="en">
{include file="user/public/header" /}

<body>
    <div class="container-scroller">
        {include file="user/public/navbar" /}
        <div class="container-fluid page-body-wrapper">
            {include file="user/public/sidebar" /}
            <div class="main-panel" id="apps">

                <div class="content-wrapper">
                    <div class="row">
                        <div class="col-md-12 grid-margin stretch-card" style="min-height: 450px;">
                            <div class="card">
                                <div class="card-body">
                                    <!-- <h4 class="card-title">基础设置</h4> -->
                                    <!-- <p class="card-description">
                                Basic form layout
                              </p> -->
                              <el-row >
                                <el-col :span="24" > <el-button type="primary" @click="add">新增</el-button></el-col>
                              </el-row>
                                    <el-table :data="tableData" style="margin-top: 10px;">
                                        <el-table-column prop="name" label="位置"  ></el-table-column>
                                        <el-table-column prop="date" label="创建时间"  ></el-table-column>
                                        <el-table-column prop="address" label="操作" >
                                            <template #default>
                                              <el-button link type="primary" size="small">编辑</el-button>
                                              <el-button link type="primary" size="small" @click="setinfo()">座位</el-button>
                                              <el-button link type="primary" size="small">删除</el-button>
                                            </template>
                                          </el-table-column>
                                    </el-table>
                                </div>
                            </div>
                        </div>
                      
                    </div>



                </div>
                <!-- main-panel ends -->
            </div>
        </div>

        {include file="user/public/footer" /}

        <script type='text/javascript'>
            const App = {
                data() {
                    return {
                        tableData: [{
                                date: '2016-05-03',
                                name: 'Tom',
                                address: 'No. 189, Grove St, Los Angeles',
                            },
                            {
                                date: '2016-05-02',
                                name: 'Tom',
                                address: 'No. 189, Grove St, Los Angeles',
                            },
                            {
                                date: '2016-05-04',
                                name: 'Tom',
                                address: 'No. 189, Grove St, Los Angeles',
                            },
                            {
                                date: '2016-05-01',
                                name: 'Tom',
                                address: 'No. 189, Grove St, Los Angeles',
                            },
                        ]
                    };
                },
                methods: {
                    add() {
                     location.href="/demo/user/form"                        
                    },
                    setinfo(){
                        location.href="/demo/user/setinfo"   
                    },
                    onSubmit() {

                        $.ajax({
                            type: 'POST',
                            url: '/demo/user/update',
                            data: {
                                phone: "1",
                                age: 1
                            },
                            success: function (data) {
                                //请求成功函数内容
                            },
                            error: function (jqXHR) {
                                //请求失败函数内容
                            }
                        });

                        alert(1)
                    }
                }
            };
            const app = Vue.createApp(App);
            app.use(ElementPlus);
            app.mount("#apps");
        </script>





</body>

</html>